
//使用 * as引入常量
import * as at from '../constant';

//自定义默认值
const initState = {
  num:18
}
//定义reducer
let count = (state=initState,action)=>{
  switch (action.type) {
    case at.INCRE:
      return {...state,num:state.num + action.num}
    case at.DECRE:
      return {...state,num:state.num - action.num}
    default:
      return state;
  }
}
export default count
